319. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2023-07-12 04:43:09 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

319.1 Files compared

#LocationFileLast Modified
1Porto v4.0.5/Theme Files/Porto Theme/app/design/frontend/Smartwave/porto/Smartwave_Filterproducts/templatesflex_grid.phtml2022-11-02 08:51:50 +0000
22023-07-12 04:43:09 +0000

319.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged00
Changed00
Inserted00
Removed1316

319.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

319.4 Active regular expressions

No regular expressions were active.

319.5 Comparison detail

1 <?php    
2 /**    
3  * Copyright © 2015 Magento. All rights reserved.    
4  * See COPYING.txt for license details.    
5  */    
6 use Magento\Framework\App\Action\Action;    
7     
8 // @codingStandardsIgnoreFile    
9 ?>    
10 <?php    
11 /**    
12  * Product list template    
13  *    
14  * @var $block \Smartwave\Filterproducts\Block\    
15  */    
16 ?>    
17 <?php    
18 $_productCollection = $block->getLoadedProductCollection();    
19 $_helper = $this->helper('Magento\Catalog\Helper\Output');    
20 $_imagehelper = $this->helper('Magento\Catalog\Helper\Image');    
21 $_portohelper = $this->helper('Smartwave\Porto\Helper\Data');    
22 $review_model = $_portohelper->getModel('\Magento\Review\Model\Review');    
23 $_category_config = $_portohelper->getConfig('porto_settings/category');    
24 $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid');    
25 $_product_label_config = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/product_label');    
26 $_lazyload = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/optimization/lazyload');    
27     
28 $aspect_ratio = $this->getData("aspect_ratio");    
29 if($aspect_ratio == null) {    
30     $aspect_ratio = $_category_config['aspect_ratio'];    
31 }    
32 $image_width = $this->getData("image_width");    
33 if(!$image_width) {    
34     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300;    
35 }    
36 $image_height = $this->getData("image_height");    
37 if($aspect_ratio)    
38     $image_height = $image_width;    
39 if(!$image_height) {    
40     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;    
41 }    
42 $move_actions = $this->getData("move_actions");    
43 if($move_actions == null) {    
44     $move_actions = $_category_grid_config['move_actions'];    
45 }    
46 $column_count = $this->getData("column_count");    
47 if($column_count == null) {    
48     $column_count = 4;    
49 }    
50 ?>    
51 <?php if (!$_productCollection->count()): ?>    
52     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div>    
53 <?php else: ?>    
54     <?php    
55     $viewMode = 'grid';    
56     $image = 'category_page_grid';    
57     $hover_image = 'category_page_grid-hover';    
58     $showDescription = false;    
59     $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;    
60     ?>    
61     <div class="products wrapper <?php echo $viewMode; ?> columns<?php echo $column_count; ?> flex-grid products-<?php echo $viewMode; ?>">    
62         <?php $iterator = 1; ?>    
63         <ol class="filterproducts products list items product-items">    
64             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>    
65             <?php foreach ($_productCollection as $_product): ?>    
66                 <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?>    
67                 <div class="product-item-info" data-container="product-grid">    
68                     <?php // Product Image ?>    
69                     <div class="product photo product-item-photo">    
70                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1">    
71                         <?php    
72                             if($aspect_ratio)    
73                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);    
74                             else    
75                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height);    
76                             $productImageUrl = $productImage->getUrl();    
77                         ?>    
78                             <img class="product-image-photo default_image <?php if(!$_lazyload): ?>porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>data-<?php endif; ?>src="<?php echo $productImageUrl; ?>" alt="<?php //echo $productImage->getLabel();?>"/>    
79                         <?php if($_category_config['alternative_image']): ?>    
80                         <?php    
81                             if($aspect_ratio)    
82                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);    
83                             else    
84                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height);    
85                             $productHoverImageUrl = $productHoverImage->getUrl();    
86                         ?>    
87                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?>    
88                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/>    
89                             <?php endif; ?>    
90                         <?php endif; ?>    
91                         </a>    
92                         <?php    
93                             $product_label = "";    
94                             if($_product_label_config['sale_label']) {    
95                                 if ($percentage = $_portohelper->getPercentage($_product)) {    
96                                     if($_product_label_config['sale_label_percent']) {    
97                                         $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>';    
98                                     } else {    
99                                         $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>';    
100                                     }    
101                                 }    
102                             }    
103                             if($_product_label_config['new_label']) {    
104                                 $now = date("Y-m-d");    
105                                 $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10);    
106                                 $newsTo=  substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10);    
107     
108                                 if ($newsTo != '' || $newsFrom != ''){    
109                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) {    
110                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>';    
111                                     }    
112                                 }    
113                             }    
114                             if($product_label)    
115                                 echo '<div class="product-labels">'.$product_label.'</div>';    
116                         ?>    
117                         <?php if($_category_config['actions'] && $move_actions): ?>    
118                         <div class="product-item-inner">    
119                             <div class="product actions product-item-actions">    
120                                 <div class="actions-primary">    
121                                     <?php if ($_product->isSaleable()): ?>    
122                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>    
123                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">    
124                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">    
125                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">    
126     
127                                             <?php echo $block->getBlockHtml('formkey')?>    
128                                             <button type="submit"    
129                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"    
130                                                     class="action tocart primary">    
131                                                 <span><?php echo __('Add to Cart') ?></span>    
132                                             </button>    
133                                         </form>    
134                                     <?php else: ?>    
135                                         <?php if ($_product->getIsSalable()): ?>    
136                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>    
137                                         <?php else: ?>    
138                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>    
139                                         <?php endif; ?>    
140                                     <?php endif; ?>    
141                                 </div>    
142                                 <?php if ($block->getMode() == 'grid'): ?>    
143                                 <?php if($_category_config['addtowishlist']): ?>    
144                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>    
145                                     <a href="#"    
146                                        class="action towishlist actions-secondary"    
147                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"    
148                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"    
149                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'    
150                                        data-action="add-to-wishlist"    
151                                        role="button">    
152                                         <span><?php echo __('Add to Wish List') ?></span>    
153                                     </a>    
154                                 <?php endif; ?>    
155                                 <?php endif; ?>    
156                                 <?php endif; ?>    
157                                 <?php if($_category_config['addtocompare']): ?>    
158                                 <?php    
159                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');    
160                                 ?>    
161                                 <a href="#"    
162                                    class="action tocompare actions-secondary"    
163                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"    
164                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"    
165                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'    
166                                    role="button">    
167                                     <span><?php echo __('Add to Compare') ?></span>    
168                                 </a>    
169                                 <?php endif; ?>    
170                             </div>    
171                         </div>    
172                         <?php endif; ?>    
173                     </div>    
174                     <div class="product details product-item-details">    
175                         <?php    
176                             $_productNameStripped = $block->stripTags($_product->getName(), null, true);    
177                         ?>    
178                         <?php if(!$_category_grid_config['move_title']):?>    
179                             <strong class="product name product-item-name">    
180                                 <a class="product-item-link"    
181                                    href="<?php echo $_product->getProductUrl() ?>">    
182                                     <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>    
183                                 </a>    
184                             </strong>    
185                         <?php endif;?>    
186                         <?php //$_category_config['rating_star'] = "";  //disabled at the moment ?>    
187                         <?php if($_category_config['rating_star']): ?>    
188                         <?php    
189                             $review_model->getEntitySummary($_product);    
190                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType);    
191                         ?>    
192                         <?php if($review_html): ?>    
193                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>    
194                         <?php else: ?>    
195                         <div class="product-reviews-summary short">    
196                             <div class="rating-summary">    
197                                 <span class="label"><span>Rating:</span></span>    
198                                 <div class="rating-result" title="0%">    
199                                     <span style="width:0"><span>0%</span></span>    
200                                 </div>    
201                             </div>    
202                         </div>    
203                         <?php endif; ?>    
204                         <?php endif; ?>    
205                         <?php if($_category_grid_config['move_title']):?>    
206                             <strong class="product name product-item-name">    
207                                 <a class="product-item-link"    
208                                    href="<?php echo $_product->getProductUrl() ?>">    
209                                     <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>    
210                                 </a>    
211                             </strong>    
212                         <?php endif;?>    
213                         <?php if ($showDescription):?>    
214                             <div class="product description product-item-description">    
215                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>    
216                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>"    
217                                    class="action more"><?php echo __('Learn More') ?></a>    
218                             </div>    
219                         <?php endif; ?>    
220                         <?php if($_category_config['product_price']): ?>    
221                         <?php echo $block->getProductPrice($_product) ?>    
222                         <?php endif; ?>    
223                         <?php echo $block->getProductDetailsHtml($_product); ?>    
224     
225                         <?php if($_category_config['actions'] && !$move_actions): ?>    
226                         <div class="product-item-inner">    
227                             <div class="product actions product-item-actions">    
228                                 <?php if ($block->getMode() == 'grid'): ?>    
229                                 <?php if($_category_config['addtowishlist']): ?>    
230                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>    
231                                     <a href="#"    
232                                        class="action towishlist actions-secondary"    
233                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"    
234                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"    
235                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'    
236                                        data-action="add-to-wishlist"    
237                                        role="button">    
238                                         <span><?php echo __('Add to Wish List') ?></span>    
239                                     </a>    
240                                 <?php endif; ?>    
241                                 <?php endif; ?>    
242                                 <?php endif; ?>    
243                                 <div class="actions-primary">    
244                                     <?php if ($_product->isSaleable()): ?>    
245                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>    
246                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">    
247                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">    
248                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">    
249     
250                                             <?php echo $block->getBlockHtml('formkey')?>    
251                                             <button type="submit"    
252                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"    
253                                                     class="action tocart primary">    
254                                                 <span><?php echo __('Add to Cart') ?></span>    
255                                             </button>    
256                                         </form>    
257                                     <?php else: ?>    
258                                         <?php if ($_product->getIsSalable()): ?>    
259                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>    
260                                         <?php else: ?>    
261                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>    
262                                         <?php endif; ?>    
263                                     <?php endif; ?>    
264                                 </div>    
265                                 <?php if($_category_config['addtocompare']): ?>    
266                                 <?php    
267                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');    
268                                 ?>    
269                                 <a href="#"    
270                                    class="action tocompare actions-secondary"    
271                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"    
272                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"    
273                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'    
274                                    role="button">    
275                                     <span><?php echo __('Add to Compare') ?></span>    
276                                 </a>    
277                                 <?php endif; ?>    
278                             </div>    
279                         </div>    
280                         <?php endif; ?>    
281                     </div>    
282                 </div>    
283                 <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?>    
284             <?php endforeach; ?>    
285         </ol>    
286     </div>    
287     <script type="text/javascript">    
288         require([    
289             'jquery'    
290         ], function ($) {    
291             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n)').addClass('nth-child-2n');    
292             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n+1)').addClass('nth-child-2np1');    
293             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n)').addClass('nth-child-3n');    
294             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n+1)').addClass('nth-child-3np1');    
295             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n)').addClass('nth-child-4n');    
296             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n+1)').addClass('nth-child-4np1');    
297             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n)').addClass('nth-child-5n');    
298             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n+1)').addClass('nth-child-5np1');    
299             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n)').addClass('nth-child-6n');    
300             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n+1)').addClass('nth-child-6np1');    
301             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n)').addClass('nth-child-7n');    
302             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n+1)').addClass('nth-child-7np1');    
303             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n)').addClass('nth-child-8n');    
304             $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n+1)').addClass('nth-child-8np1');    
305         });    
306     </script>    
307     <?php if (!$block->isRedirectToCartEnabled()) : ?>    
308         <script type="text/x-magento-init">    
309         {    
310             "[data-role=tocart-form], .form.map.checkout": {    
311                 "catalogAddToCart": {}    
312             }    
313         }    
314         </script>    
315     <?php endif; ?>    
316 <?php endif; ?>